
<h2> <?= $pkgtitle ?> </h2>

<?php foreach($pkglist as $item):?>

<div id="package-<?= $item['pkg_id']; ?>" class="package">
<table >
<tr>
<td style="width: 100%;" onclick="showDetailsPkg('<?= $item['pkg_id']; ?>');">
<span class="title-package" ><?= $item['name'];?></span>
</td>
<?php if ($this->auth->has_rights_to("add","bch",$item['pkg_id'])): ?>
<td>
<img class="action" title="Add new branch" style="cursor: pointer;" onclick="update_content('<?php echo site_url("branch/add/".$item['pkg_id']); ?>')" alt="Add Branch" src="<?= base_url();?>img/add.png" />
</td>
<?php endif; ?>
<?php if ($this->auth->has_rights_to("edit","pkg",$item['pkg_id'])): ?>
<td>
<img class="action" title="Edit the package" style="cursor: pointer;" onclick="update_content('<?php echo site_url("package/edit/".$item['pkg_id']); ?>')" alt="Edit Package" src="<?= base_url();?>img/edit.png" />
</td>
<?php endif; ?>
<?php if ($this->auth->has_rights_to("delete","pkg",$item['pkg_id'])): ?>
<td>
<img class="action" title="Delete the package" style="cursor: pointer;" onclick="deletePackage(<?= $item['pkg_id']; ?>);" alt="Delete Package" src="<?= base_url();?>img/delete.png" />
</td>
<?php endif; ?>
</tr>
</table>
</div>
<div id="branchlist-<?= $item['pkg_id'];?>" style="display:none;"> branchs </div>
<?php endforeach;?>

<?php if (isset($pagination)) echo $pagination; ?>

<div id="infos">

  <h3>Infos</h3>

  	package:
	<div id="details-package" class="details" style="display:none;"> </div>
	branch:
	<div id="details-branch" class="details" style="display:none;"> </div>
	release:
	<div id="details-release" class="details" style="display:none;"> </div>

</div>